<%@ page import="java.sql.*"%>
<%@page import="java.util.*"%>
<%@ page import="beans.*"%>
<%@page import="java.lang.*"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>


<script type="text/javascript">


function listaAreaColl()
{
	
	if(document.getElementById('ruolocoll').checked){
		
		document.getElementById('elencoColl').style.display="block";
		document.getElementById('annoConv').style.display="block";
		
	
	}else{
		document.getElementById('elencoColl').style.display="none";
		
		if(document.getElementById('elencoConv').style.display=="none"){
			
			document.getElementById('annoConv').style.display="none";
		}
			
		}
	
	
}

function listaProvConv()
{
	
if(document.getElementById('ruoloconv').checked){
		
		document.getElementById('elencoConv').style.display="block";
		document.getElementById('annoConv').style.display="block";
		
	}else{
		document.getElementById('elencoConv').style.display="none";
		
		if(document.getElementById('elencoColl').style.display=="none"){
			
			document.getElementById('annoConv').style.display="none";
			
		}
	}
}


/*function listaAreaColl()
{
	
	if(document.getElementById('elencoColl').style.display=="none"){
		
		document.getElementById('elencoColl').style.display="block";
		document.getElementById('annoConv').style.display="block";
		
		
		
	}else{
		document.getElementById('elencoColl').style.display="none";
		
		if(document.getElementById('elencoConv').style.display=="none"){
			
			document.getElementById('annoConv').style.display="none";
			
		}
		
	}

}

function listaProvConv()
{
	
if(document.getElementById('elencoConv').style.display=="none"){
		
		document.getElementById('elencoConv').style.display="block";
		document.getElementById('annoConv').style.display="block";
		
		
		
	}else{
		document.getElementById('elencoConv').style.display="none";
		
		if(document.getElementById('elencoColl').style.display=="none"){
			
			document.getElementById('annoConv').style.display="none";
			
		}
		
	}

}
*/


</script>


<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">



<title><%@ include file="title.jspf" %></title>
<link href="stile.css" rel="stylesheet" type="text/css">
<link rel="icon" href="favicon.ico" type="image/x-icon" />
</head>
<body>
	<div id="top">
		<%@ include file="top.jspf"%>
	</div>


	<div id="container">
		<div id="header">
			<%@ include file="header.jspf"%>
		</div>
		<div id="page">
		
		<%
	
	if(session.getAttribute("currentSessionUser") != null){
		
%>



<%-- 


--%>


			<form method="post" action="Insert_User?tipo=ins">

				<table align="center">
					
					<tr  style="width: 600px" align="center">
						<td>Nome&nbsp</td>
						<td align="left"><input type="text" name="Nome" required style="width: 400px"></td>
					</tr>
					
					<tr align="center">
						<td>Cognome&nbsp</td>
						<td><input type="text" name="Cognome" required style="width: 400px"></td>
					</tr>
					
					<tr align="center">
						<td >Username&nbsp</td>
						<td><input type="text" name="Username" required style="width: 400px"></td>
					</tr>
					
					<tr align="center">
						<td>Password&nbsp</td>
						<td><input type="password" name="Password" required style="width: 400px"></td>
					</tr>
					
					
					<tr align="center">
						<td>Ruolo/i&nbsp</td>
						
						<td>
						<input type="checkbox" id="ruolocoll" name="Ruolo" value="COLLETTA" onchange="listaAreaColl()">Colletta
						<input type="checkbox" id="ruoloconv" name="Ruolo" value="CONVENZIONI" onchange="listaProvConv()">Convenzioni
						<input type="checkbox" name="Ruolo" value="ADMIN">Amministratore
						
						</td>
					</tr>					
					
					<tr>
						<td>&nbsp</td>
					</tr>					
					
					
					
					<tr align="center" id="elencoColl" style="display:none">
						<td>Area Colletta&nbsp</td>
						

						<td>
						<input type="checkbox" name="Area" value="REGGIO">REGGIO
						<input type="checkbox" name="Area" value="LOCRIDE">LOCRIDE
						<input type="checkbox" name="Area" value="PIANA">PIANA
						<input type="checkbox" name="Area" value="RENDE">RENDE
						<input type="checkbox" name="Area" value="MONTALTO CS">MONTALTO CS
						<input type="checkbox" name="Area" value="COSENZA CS">COSENZA CS
						<input type="checkbox" name="Area" value="REGGIO CENTRO RC">REGGIO CENTRO RC
						<input type="checkbox" name="Area" value="RC REGGIO CENTRO">RC REGGIO CENTRO
						<input type="checkbox" name="Area" value="RC REGGIO NORD">RC REGGIO NORD
						<input type="checkbox" name="Area" value="RC REGGIO SUD">RC REGGIO SUD
						<input type="checkbox" name="Area" value="RC LOCRIDE">RC LOCRIDE
						<input type="checkbox" name="Area" value="RC PIANA">RC PIANA
						<input type="checkbox" name="Area" value="RC IONICA">RC IONICA
						<input type="checkbox" name="Area" value="CS COSENZA CENTRO">CS COSENZA CENTRO
						<input type="checkbox" name="Area" value="CS RENDE">CS RENDE
						<input type="checkbox" name="Area" value="CS MONTALTO">CS MONTALTO
						
						</td>
					
					
					</tr>
					
				
					
					<tr>
						<td>&nbsp</td>
					</tr>					
					
					
					<tr align="center" id="annoConv" style="display: none">
						<td>Anno Convenzioni&nbsp</td>
						<td><input type="text" name="AnnoConvenzioni" required style="width: 400px"></td>
					</tr>
					
					<tr align="center">
						<td>&nbsp</td>
					</tr>					
					
					
					
					
					<tr align="center" id="elencoConv" style="display: none">
						<td>Provincia Convenzioni&nbsp</td>
						
						<td>
						
						<input type="checkbox" name="ProvinciaConvenzioni" value="CS">Cosenza
						<input type="checkbox" name="ProvinciaConvenzioni" value="CZ">Catanzaro
						<input type="checkbox" name="ProvinciaConvenzioni" value="RC">Reggio Calabria
						<input type="checkbox" name="ProvinciaConvenzioni" value="VV">Vibo Valentia
						<input type="checkbox" name="ProvinciaConvenzioni" value="KR">Crotone
						
						
						
						</td>
					</tr>
										
				</table>
				<br>
				<div align="center">
					<input type="reset" value="Cancella">&nbsp&nbsp<input
						type="submit" value="Inserisci">
				</div>
			</form>
			
			<%}
		
	else{%>
				
				Non disponi dei privilegi necessari per completare questa operazione!
				
				<%}
				
	
%>
				

		</div>
		<!-- chiusura del div page-->

		<div id="footer">
			<%@ include file="footer.jspf"%>
		</div>
	</div>

</body>
</html>